
prototype.Player = {name = "Player"}


function prototype.Player:OnJoin( id, s )
    this.id = id
    this.name = s or "Player"
    this.vehicle = shared_entity_factory.Create("ghost")
    this.score = 0
end

function prototype.Player:SetName( s )
    this.name = s
end

function prototype.Player:Kick()
    self.Leave()
end

function prototype.Player:Control( c )
    --Callback (only called on the server and the host where player is local)
    --with c being the incoming control structure (as a table)
    if (c.id == 10) then
        --Open chat dialog
        io.stdout.write("Chat window opened?? Just lettin' you know because we totally haven't implemented that yet.\n")
    end elseif (c.id == 11) then
        --Pause
        io.stdout.write("Game paused. Can you do that in multiplayer?\n")
    end else
        this.Control_Map[c.id](c.state)
    end
end

--function prototype.Player:Leave()
--function prototype.Player:SayAll( s )
--function prototype.Player:SayTeam( s )
--function prototype.Player:SayPlayer( s, p )
--function prototype.Player:GetPlayerID()
